package com.eastfair.tag.api;

import com.eastfair.core.base.R;
import com.eastfair.tag.dto.TagTargetBusinessDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * feign接口
 *
 * @author zjn
 */
@FeignClient(value = "tag/tagTargetBusiness")
public interface TagTargetBusinessServiceFeign {

    /**
     * 主体标签直接绑定
     *
     * @param tagTargetBusinessDTO 主体标签信息
     * @return 是否成功
     */
    @ApiOperation("主体标签直接绑定")
    @PostMapping({"/saveTagTarget"})
    R<Boolean> saveTagTarget(@RequestBody TagTargetBusinessDTO tagTargetBusinessDTO);

    /**
     * 主体标签间接绑定
     *
     * @param tagTargetBusinessDTO 主体资源信息
     * @return 是否成功
     */
    @ApiOperation("主体标签间接绑定")
    @PostMapping({"/saveTagTargetByResourceType"})
    R<Boolean> saveTagTargetByResourceType(@RequestBody TagTargetBusinessDTO tagTargetBusinessDTO);

    /**
     * 获取主体标签
     *
     * @param tagTargetBusinessDTO 主体资源信息
     * @return 是否成功
     */
    @ApiOperation("获取主体标签")
    @PostMapping({"/getTargetTagList"})
    R<List<Object>> getTargetTagList(@RequestBody TagTargetBusinessDTO tagTargetBusinessDTO);

}